home *** CD-ROM | disk | FTP | other *** search
-
- Change V1.0
- ===========
-
- Change alters a file by following commands given in another file. Patches
- can be described in a Change command file, avoiding the need for larger
- patch executables.
-
-
- Usage
- =====
-
- change <source-file> <instruction-file>
-
-
- Command Files
- =============
-
- These files give instructions on how to make changes to a file and can be
- entered via a file editor. Although this is awkward, most of the command
- files are very small. Also, if there is enough interest, a "compiler" may be
- written by myself or others. The commands are executed in order.
-
-
- Commands
- ========
-
- Commands are
-
- General Structure:
- -----------------
-
- <command(BYTE)> <offset/length(LONG)> [<sequence(offset/length BYTEs)>]
-
-
- GOTO(from start): 00 <offset(LONG)>
- ----------------
-
- Sets the current position to the given absolute offset within the target
- file.
-
- Example: 00 00000100 (go to the 256th byte of the target file)
-
-
- GOTO(from current pos): 01 <offset(LONG)>
- ----------------------
-
- Moves the current position within the target file forward the given number
- of bytes (or backwards if negative).
-
- Example: 01 FFFFFFF6 (go back 10 bytes in the target file)
-
-
- GOTO(from end): 02 <offset(LONG)>
- --------------
-
- Moves to a position in the target file relative to the position just after
- the last byte of the file.
-
- Example: 02 FFFFFFFE (go to the second-last byte of the target file)
-
-
- FIND: 03 <length(LONG)> <sequence(<length> BYTEs)>
- ----
-
- Searches for the next occurance of the given sequence within the target
- file and moves the current position to where it's found.
-
- Example: 03 00000005 01 02 03 04 05 (find the numeric sequence 1,2,3,4,5)
-
-
- CHECK: 04 <length(LONG)> <sequence(<length> BYTEs)>
- -----
-
- Ensures that the given sequence occurs in the target file at the current
- position. Does not affect the current position.
-
- Example: 04 00000003 03 02 01 (check that the numeric sequence 3,2,1 starts
- at the current position)
-
-
- WRITE: 05 <length(LONG)> <sequence(<length> BYTEs)>
- -----
-
- Writes the given sequence to the target file at the current position and
- moves the current position to the first byte after the written sequence.
-
- Example: 05 00000004 00 00 00 00 (write four zero bytes starting at the
- current position)
-
- GOTO(from start): 00 <offset(LONG)>
- GOTO(from current pos): 01 <offset(LONG)>
- GOTO(from end): 02 <offset(LONG)>
- FIND: 03 <length(LONG)> <sequence(<length> BYTEs)>
- CHECK: 04 <length(LONG)> <sequence(<length> BYTEs)>
- WRITE: 05 <length(LONG)> <sequence(<length> BYTEs)>
-
-
- Distribution
- ============
-
- Change is freeware. It may be distributed freely as long as it is
- accompanied by this file.
-
-
- Bugs and Suggestions
- ====================
-
- Send bug reports, suggestions etc. to: Neil Cafferkey <caffer@cs.ucc.ie>
-
-
-